<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>array数组</title>
		<script>
			var a=new Array(3);//[]
			a[0]="tiger";
			a[1]="dog";
			a[10]="pig";
			a["clsName"]="java82";
			//alert(a.length);
			//alert(a["clsName"]);
			for(let i in a){
				document.write(i+","+a[i]+"<br/>")
			}
			document.write("<hr/>");
			for(let i of a){
				document.write(i+"<br/>")
			}
		</script>
	</head>
	<body>
	</body>
</html>